﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.ComponentModel;

namespace MediaController.Configuration
{
    [Serializable]
    [XmlType("AutoMovingConfiguration")]
    public class AutoMovingConfiguration : Configuration<AutoMovingConfiguration>, IListSource
    {
        [XmlRoot("FolderConfiguration")]
        [XmlType("FolderConfiguration")]
        [Serializable]
        public class FolderConfiguration
        {
            public bool Enabled { get; set; }

            public string SearchPatern { get; set; }

            public string MoveTo { get; set; }
        }

        public bool MoveWithFolder { get; set; }

        [XmlArray("Folders")]
        [XmlArrayItem("FolderConfiguration")]
        public List<FolderConfiguration> FolderConfig { get; set; }

  
        public bool ContainsListCollection
        {
            get { return true; }
        }

        public System.Collections.IList GetList()
        {
            return FolderConfig;
        }

    }
}
